Optimal. Leaf size=38 \[ -\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}+\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0648538, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3506, 697} \[ -\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}+\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3506
Rule 697
Rubi steps
\begin{align*} \int \frac{\csc ^4(x)}{a+b \cot (x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1+\frac{x^2}{b^2}}{a+x} \, dx,x,b \cot (x)\right )}{b}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-\frac{a}{b^2}+\frac{x}{b^2}+\frac{a^2+b^2}{b^2 (a+x)}\right ) \, dx,x,b \cot (x)\right )}{b}\\ &=\frac{a \cot (x)}{b^2}-\frac{\cot ^2(x)}{2 b}-\frac{\left (a^2+b^2\right ) \log (a+b \cot (x))}{b^3}\\ \end{align*}
Mathematica [A] time = 0.14594, size = 48, normalized size = 1.26 \[ \frac{2 \left (a^2+b^2\right ) (\log (\sin (x))-\log (a \sin (x)+b \cos (x)))+2 a b \cot (x)-b^2 \csc ^2(x)}{2 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.05, size = 64, normalized size = 1.7 \begin{align*} -{\frac{1}{2\,b \left ( \tan \left ( x \right ) \right ) ^{2}}}+{\frac{\ln \left ( \tan \left ( x \right ) \right ){a}^{2}}{{b}^{3}}}+{\frac{\ln \left ( \tan \left ( x \right ) \right ) }{b}}+{\frac{a}{{b}^{2}\tan \left ( x \right ) }}-{\frac{\ln \left ( a\tan \left ( x \right ) +b \right ){a}^{2}}{{b}^{3}}}-{\frac{\ln \left ( a\tan \left ( x \right ) +b \right ) }{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.20574, size = 70, normalized size = 1.84 \begin{align*} -\frac{{\left (a^{2} + b^{2}\right )} \log \left (a \tan \left (x\right ) + b\right )}{b^{3}} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (\tan \left (x\right )\right )}{b^{3}} + \frac{2 \, a \tan \left (x\right ) - b}{2 \, b^{2} \tan \left (x\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.84446, size = 281, normalized size = 7.39 \begin{align*} -\frac{2 \, a b \cos \left (x\right ) \sin \left (x\right ) - b^{2} +{\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) -{\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \log \left (-\frac{1}{4} \, \cos \left (x\right )^{2} + \frac{1}{4}\right )}{2 \,{\left (b^{3} \cos \left (x\right )^{2} - b^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{4}{\left (x \right )}}{a + b \cot{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.24584, size = 105, normalized size = 2.76 \begin{align*} \frac{{\left (a^{2} + b^{2}\right )} \log \left ({\left | \tan \left (x\right ) \right |}\right )}{b^{3}} - \frac{{\left (a^{3} + a b^{2}\right )} \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a b^{3}} - \frac{3 \, a^{2} \tan \left (x\right )^{2} + 3 \, b^{2} \tan \left (x\right )^{2} - 2 \, a b \tan \left (x\right ) + b^{2}}{2 \, b^{3} \tan \left (x\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]